package com.xuanwei.rabbit_consume.config;

import com.xuanwei.xwcommon.consts.MqType;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class RabbiMqConfig {

    @Bean
    public Queue productQueue() {
        return new Queue(MqType.PRODUCT);
    }

    @Bean
    public Queue orderQueue() {
        return new Queue(MqType.ORDER);
    }

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
